var mongoose=require('mongoose');

var Schema= mongoose.Schema;
//连接数据库
mongoose.connect('mongodb://localhost/test');

var UserShema = new Schema({
    name : {type:String},
    age : {type:Number},

})

//将文档发布模型
var User = mongoose.model('User', UserShema);